Skip to content

Conversation

@nateinaction
Copy link
Collaborator

@nateinaction nateinaction commented Sep 7, 2025

This pull request introduces a new ImuManager (Inertial Measurement Unit) component to the Fprime Zephyr Reference deployment. The ImuManager component interfaces with hardware sensors to provide acceleration, angular velocity, magnetic field, and temperature telemetry.

  • Added new ImuManager component. The component reads data from LSM6DSO and LIS2MDL sensors and outputs acceleration, angular velocity, and magnetic field as telemetry.
  • Temperature telemetry is read but not omitted. We can use this later in a temperature health packet.
  • Added the Drv/Lsm6dsoDriver component. This component provides ports and events for reading the acceleration, angular velocity, and its temperature.
  • Added the Drv/Lis2mdlDriver component. This component provides ports and events for reading the magnetic field.
  • Added comprehensive documentation for the all components components, detailing their usage, requirements, ports, events, and sequence diagrams.

Deployment Integration:

  • Declared and instantiated the imuManager component in the deployment's FPP instance and topology files, and connected its run handler to the 10Hz rate group.

Telemetry and Packetizer Configuration:

  • Added new telemetry packet definitions for the IMU data and omitted a temperature channel.
  • Increased the maximum number of telemetry packets and hash buckets in TlmPacketizerCfg.hpp to accommodate the new IMU telemetry.
Captura de pantalla 2025-09-09 a la(s) 00 33 10

@nateinaction nateinaction requested a review from Copilot September 9, 2025 05:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new IMU (Inertial Measurement Unit) component to the FprimeZephyrReference project that interfaces with LIS2MDL magnetometer and LSM6DSO accelerometer/gyroscope sensors to provide telemetry data for acceleration, angular velocity, magnetic field, and temperature measurements.

  • Creates a new passive IMU component with telemetry channels for sensor data
  • Integrates the IMU component into the system topology and scheduling infrastructure
  • Updates telemetry configuration to accommodate the new sensor data packets

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
FprimeZephyrReference/project/config/TlmPacketizerCfg.hpp Increases telemetry packet and bucket limits to accommodate new IMU telemetry
FprimeZephyrReference/ReferenceDeployment/Top/topology.fpp Adds IMU instance and connects it to 1Hz rate group for periodic execution
FprimeZephyrReference/ReferenceDeployment/Top/instances.fpp Defines IMU component instance with base ID and configuration
FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentPackets.fppi Creates new telemetry packet for IMU data and omits temperature channel
FprimeZephyrReference/Components/Imu/docs/sdd.md Provides comprehensive documentation for IMU component design and requirements
FprimeZephyrReference/Components/Imu/Imu.hpp Header file defining IMU component class interface and member variables
FprimeZephyrReference/Components/Imu/Imu.fpp F Prime component definition with telemetry structures and ports
FprimeZephyrReference/Components/Imu/Imu.cpp Implementation of IMU component with sensor initialization and data collection
FprimeZephyrReference/Components/Imu/CMakeLists.txt Build configuration for IMU component library
FprimeZephyrReference/Components/CMakeLists.txt Adds IMU subdirectory to component build system

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nateinaction nateinaction changed the title DRAFT IMU Component IMU Component Sep 9, 2025
@nateinaction nateinaction marked this pull request as ready for review September 9, 2025 05:45
@ineskhou ineskhou moved this to In progress in v0.1-v0.3 Sep 10, 2025
@ineskhou ineskhou moved this from In progress to In review in v0.1-v0.3 Sep 10, 2025
@ineskhou ineskhou moved this from In review to In progress in v0.1-v0.3 Sep 10, 2025
hrfarmer and others added 3 commits September 18, 2025 16:45
* add lis2mdl driver and implement in imu component

* fix formatting
* Update README.md

* Create lmsd6dsoDriver component

* create ports for sensor reading output

* fix port naming issue

* Use custom board definition

* Remove commented config

* Moving prj.conf sensors to board definition

* Add d board

* Try referencing c definitions in d board

* Making a common v5 board definition

* Fix readme

* Minor Makefile, Readme and cmake presets fixes

* change lsm6dso internal structs to carry F64 and added output ports to imu

* removed lmsdso init from imu constructor

* remove old sensor reading from imu

* add lms6dso driver to topology

* change base id to allow for lis2mdl driver

* remove line endings

* add channel retrieval during sensor data

* Ensure submodules are downloaded before venv is created

* Fix infinit submodule make target recursion...

---------

Co-authored-by: ineskhou <[email protected]>
Co-authored-by: Nate Gay <[email protected]>
Co-authored-by: Nate Gay <[email protected]>
Co-authored-by: Saidi Adams <[email protected]>
Co-authored-by: Michael Pham <[email protected]>
@nateinaction nateinaction changed the title IMU Component ImuManager Component Sep 18, 2025
@nateinaction nateinaction changed the title ImuManager Component Introduce ImuManager, Lis2mdlDriver & Lsm6dsoDriver Components Sep 18, 2025
Base automatically changed from board-definition to main September 18, 2025 22:28
@nateinaction nateinaction requested review from Mikefly123 and ineskhou and removed request for ineskhou September 18, 2025 22:55
@hrfarmer hrfarmer requested review from hrfarmer and ineskhou and removed request for hrfarmer and ineskhou September 26, 2025 00:32
Copy link
Contributor

@ineskhou ineskhou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im a big fan

Copy link
Contributor

@Mikefly123 Mikefly123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

NOTE: Understood edge case behavior where the integration tests may fail if the sensors return an (unlikely) perfect 0.0 value.

@nateinaction nateinaction moved this from In review to Done in v0.1-v0.3 Sep 30, 2025
@nateinaction nateinaction moved this from Done to In review in v0.1-v0.3 Sep 30, 2025
@hrfarmer hrfarmer merged commit b0fd33e into main Oct 1, 2025
3 of 4 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in v0.1-v0.3 Oct 1, 2025
@hrfarmer hrfarmer deleted the imu2 branch October 1, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants